CC = gcc

DIR_INC = ./inc
DIR_SRC = ./src
DIR_OBJ = ./obj
DIR_BIN = ./bin
LDFLAGS = -lpthread

SRC = $(wildcard ${DIR_SRC}/*.c)
OBJS = $(patsubst %.c,${DIR_OBJ}/%.o,$(notdir ${SRC}))

TARGET = ${DIR_BIN}/feige
CFLAGS = -g -Wall -I${DIR_INC}

$(TARGET):$(OBJS)
	@$(CC) $(OBJS) $(LDFLAGS) -o $@

${DIR_OBJ}/%.o:${DIR_SRC}/%.c
	@$(CC) $(CFLAGS) -c $< -o $@

clean:
	@rm -f $(TARGET) $(OBJS)
.PHONY:clean
